﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.js"></script>
      <style type="text/css">

 p.MsoNormal
	{margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";
	              margin-left: 0cm;
                  margin-right: 0cm;
                  margin-top: 0cm;
            }
      </style>
</head>
<body>
      <div class="fun_title">
             &lt;h:editdroplist&gt;&lt;/h:editdroplist&gt;可编辑下拉列表标记
      </div>
      <div class="fun_content">
            描述：可编辑下拉列表标记。<br />
      </div>
      <div class="fun_title2">
            标签属性:
      </div>
      <div class="fun_content2">
           Value：编辑框的值。<br />
           ItemHeight：子项的高度。<br />
           DropBoxCss：下拉框的CSS样式。默认：DropBoxCss<br />
           ItemTemplet：子项横板，及可以是标记模板，也可以是属性模板<br />
           ItemHeight：设置子项高度：默认为：26;<br />
           TextDataTemplet：文本数据模板，属性模板<br />
           itemcss：下接框子项的样式 : 默认："itemcss"<br />
           itemcsshover：下接框移动到子项的样式 默认："itemcsshover"<br />
           itemselectcss：下接框中选择选项的样式 默认："itemselectcss"<br />
           DropBoxMaxRows：下接框中最的显示子项数 默认："10"<br />
           Css：下拉列表框的样式 默认："Css"<br />
           CssDropDownBtn：下接按钮的样式 默认： "btn"<br />
           CssDropDownBtnHover：鼠标移动到下拉按钮上时的样式 默认："btn_hover"<br />
           DropDownBtnContent：下拉按钮中的内容 默认："　"<br />
           TextIsReadonly：设置文本框是否是只读，默认为："readonly";
      </div>
       <div class="fun_title2">
           对象属性:
      </div>
       <div class="fun_content2">
          Data：数据源<br />
           FilterDataHandle＝function(value)：数据过滤事件句柄。应返回过滤后的数据。应和数据源中的数据结构相同。<br />
           SelectedHandle=function(对象自已)：执行SetValue方法时触发的事件<br />
           TextIsReadonly：是否是可编辑的。默认："readonly" 不可编辑<br />
       </div>
      <div class="fun_title2">
            对象方法:
      </div>
       <div class="fun_content2">
          <span>SetWidth(width)</span> ：设置宽度。<br />
          <span> SetData(data)</span> ：设置数据源。<br />
           <span> Bind([data])</span> ：绑定对象,data:数据源<br />
           <span>GetSelect()</span> ：获到选择项,数据结构与传入data的数据结构相同。<br />
           <span>SetValue(value)</span> ：设置编辑框中的值。<br />
           <span>GetValue()</span> ：获取编辑框中的值。<br />
      </div>
      <div id="msg" class="fun_title2">
            示例预览:
      </div>
      <div class="code">
<h:editdroplist id="edit" TextDataTemplet="{=name}" TextIsReadonly="false" DropBoxHeight="300">
<h:itemtemplet>

      &nbsp;{=name} &nbsp;id:{=id} 

</h:itemtemplet>
</h:editdroplist>
<script type="text/javascript">
      var data = new Array();
      for (var i = 0; i < 30; i++) {
      
      		data[i] = { id: i, name: "名称" + i };
		
			
      }
      _h.ready(function () {
      	var edit = _g("#edit");
      	edit.Bind(data);
      	edit.SetValue("名称10");
      });
</script>
        </div>
         <br />
       <div class="fun_title2">
            示例代码:
      </div>
       <div class="code">
             Html code
             <br />
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">h</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">:</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:maroon;mso-font-kerning:0pt">editdroplist</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"> <span style="color:red">id</span><span style="color:
blue">=&quot;edit&quot;</span> <span style="color:red">TextDataTemplet</span><span style="color:blue">=&quot;{=name}&quot;</span>
                   <span style="color:red">TextIsReadonly</span><span style="color:blue">=&quot;false&quot;</span>
                   <span style="color:red">ItemHeight</span><span style="color:blue">=&quot;26&quot;&gt;</span><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:#404040;mso-font-kerning:0pt">h</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">:</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:fuchsia;mso-font-kerning:0pt">itemtemplet</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:blue;mso-font-kerning:0pt">&gt;</span><span lang="EN-US" style="font-size:
9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
                   <span style="color:red">&amp;nbsp;</span>{=<span style="color:#404040">name</span>}
                   <span style="color:red">&amp;nbsp;</span><span style="color:#404040">id</span>:{=<span 
                         style="color:#404040">id</span>} <o:p></o:p></span>
             </p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;/</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:fuchsia;mso-font-kerning:0pt">h</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">:</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:fuchsia;mso-font-kerning:0pt">itemtemplet</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:blue;mso-font-kerning:0pt">&gt;</span><span lang="EN-US" style="font-size:
9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;/</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">h</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">:</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:maroon;mso-font-kerning:0pt">editdroplist</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:blue;mso-font-kerning:0pt">&gt;</span><span lang="EN-US" style="font-size:
9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt"> <span style="color:red">type</span><span 
                         style="color:blue">=&quot;text/javascript&quot;&gt;</span><o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>var
                   <span style="color:#404040">data</span><span style="color:blue"> </span>= new Ar<span 
                         style="color:blue">ray</span>();<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>for (var
                   <span style="color:#404040">i</span> =<span style="color:blue"> 0;</span>
                   <span style="color:#404040">i</span><span style="color:blue"> &lt; </span>30;
                   <span style="color:#404040">i</span>++) {<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span><span style="color:#404040">data</span>[<span style="color:#404040">i</span>] 
                   = { <span style="color:#404040">id</span>: <span style="color:#404040">i</span>,
                   <span style="color:#404040">name</span>: &quot;</span><span 
                         style="font-size:9.5pt;font-family:宋体;mso-ascii-font-family:&quot;Microsoft YaHei&quot;;
mso-fareast-font-family:宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">名</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">?</span><span style="font-size:9.5pt;
font-family:宋体;mso-ascii-font-family:&quot;Microsoft YaHei&quot;;mso-fareast-font-family:
宋体;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">称</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">?&quot; + i };<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>
                   <span style="color:maroon"><span style="mso-spacerun:yes">&nbsp;</span>}<o:p></o:p></span></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>_h.ready(<span 
                         style="color:#880000">function</span> () {<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span>var<span style="color:blue"> edit = </span>_g(&quot;#edit&quot;);<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   </span><span style="color:blue"><span style="mso-spacerun:yes">&nbsp;<span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt"><span style="color:#880000">edit</span></span></span></span><span 
                         style="color:maroon">.Bind</span>(data);<o:p> 
                   //=edit.SetData(data);edit.Bind();</o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" 
                         style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                   <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>});<o:p></o:p></span></p>
             <p align="left" class="MsoNormal">
                   <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;/</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                         lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">&gt;<o:p></o:p></span></p>
             </div>
      <script type="text/javascript">
            function run_click() {
                  var btn2 = _g("#btn2");
                  if (btn2.isactive == "false")
                        _h.Btn.Active(btn2, "true");
                  else
                        _h.Btn.Active(btn2, "false");
            }
      </script>
</body>
</html>
